Added Maven native implementation using flexpack#3081
Merged
agrasth merged 17 commits intojfrog:masterfrom Oct 6, 2025
Merged
Conversation
a1ecb5c to
2920eff
Compare
2920eff to
c02dc3c
Compare
c02dc3c to
15dabf6
Compare
15dabf6 to
78989c5
Compare
78989c5 to
1e5e5c1
Compare
utils/buildinfo/buildinfo.go
Outdated
| buildInstance, err := buildInfoService.GetOrCreateBuildWithProject( | ||
| buildInfo.Name, | ||
| buildInfo.Number, | ||
| "", // project key - can be empty for now |
Collaborator
There was a problem hiding this comment.
Shouldn't we pass projectKey that is available with buildInfoService?
Contributor
Author
There was a problem hiding this comment.
Thanks! will add this.
utils/buildinfo/buildinfo.go
Outdated
| // Get deployment repository from configuration | ||
| deployRepo := getDeploymentRepoFromConfig(workingDir) | ||
| if deployRepo == "" { | ||
| deployRepo = "maven-flexpack-local" // fallback |
Collaborator
There was a problem hiding this comment.
We should use Const for storing hardcoded strings.
utils/buildinfo/buildinfo.go
Outdated
| // Also check for POM file (deployed by Maven from project root) | ||
| pomPatterns := []string{ | ||
| "pom.xml", // The original POM file that Maven deployed | ||
| } |
Collaborator
There was a problem hiding this comment.
Why only file inside slice? Are we expecting more files to be added inside it? If no, then no need of slice.
b978b0f to
8fb9220
Compare
f75cff3 to
3cfdf8d
Compare
3cfdf8d to
921aebe
Compare
5 tasks
e968b71 to
f5466a8
Compare
f5466a8 to
f1e4b32
Compare
f1e4b32 to
cbfcb89
Compare
cbfcb89 to
a549f18
Compare
- Move FlexPack command handling from main.go to jfrog-cli-artifactory - Remove business logic functions (runNativeImplementation, RunActions, etc.) - Simplify main.go to focus on CLI routing only - Keep minimal import for GetJfrogCliArtifactoryApp compatibility - Successfully builds and runs basic CLI functionality This follows the established pattern where: - jfrog-cli: Command routing and CLI setup - jfrog-cli-artifactory: Business logic for Artifactory commands - build-info-go: Core FlexPack implementations
- Remove artifact verification from TestMavenBuildWithFlexPack and TestMavenBuildWithFlexPackBuildInfo - FlexPack with 'install' correctly only installs to local repository - Traditional Maven Build Info Extractor auto-deploys during install, but FlexPack follows pure Maven behavior - TestMavenFlexPackBuildProperties still uses 'deploy' and expects artifacts (correct)
…nstall - FlexPack follows standard Maven behavior where 'install' only installs to local repository - Traditional Maven Build Info Extractor auto-deploys during install (non-standard) - Updated test to not expect artifacts in build info when using 'install' with FlexPack - This aligns with the correct Maven semantics that FlexPack implements
- FlexPack uses pure Maven which requires proper <distributionManagement> in POM - Traditional Maven Build Info Extractor bypasses this requirement - Test POM doesn't have deployment configuration, causing 'mvn deploy' to fail - This is expected behavior for FlexPack - it follows standard Maven semantics
- Resolved conflicts in go.mod and go.sum - Kept local development paths for build-info-go and jfrog-cli-artifactory - Updated to latest upstream dependencies
- Removed obsolete FlexPack comments that are no longer needed - Removed duplicate CommandNotFound handler - FlexPack is now properly integrated through buildtools CLI
- Added log.Debug message when JFROG_RUN_NATIVE is detected - This provides better visibility into when FlexPack is being used - Consistent with the logging in jfrog-cli-artifactory/artifactory/commands/mvn/utils.go
- Re-added the log.Debug message that was accidentally removed - This debug message helps track when JFROG_RUN_NATIVE routing is used
- Removed duplicate import of jfrog-cli-core/v2/utils/log - The file already uses jfrog-client-go/utils/log package - This fixes the build error with redeclared log package
fluxxBot
approved these changes
Oct 4, 2025
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

devbranch.go vet ./....go fmt ./....Add FlexPack Maven Support to JFrog CLI
Summary
Implements native FlexPack Maven support in JFrog CLI, leveraging the FlexPack implementation from
build-info-goto provide enhanced build info collection and artifact management for Maven projects.Changes Made
FlexPack Integration
maven_test.gobuild-info-goFlexPack implementation for native Maven supportTest Enhancements
Dependencies
build-info-gorepositoryJFROG_RUN_NATIVE=trueenvironment variable for FlexPack executionFiles Modified
jfrog-cli/maven_test.go- Added FlexPack test coverage and fixed linting issues